package com.aikg.kgrag_java.service.adapter;

import com.aikg.kgrag_java.common.Result;
import com.aikg.kgrag_java.pojo.entity.IndexDocument;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: ElasticSearchSimilarityAdapter
 * @Description: es检索结果的适配器
 * @Author: 李宗雨
 * @Date: 2025/1/7 10:03
 * @Version: 1.0
 **/
public class ElasticSearchSimilarityAdapter {
    public static String build(List<IndexDocument> result){
        StringBuilder chunks = new StringBuilder();
        for (IndexDocument doc: result) {
            chunks.append(doc.getPageContent()).append("\n");
        }
        return chunks.toString();
    }
}
